<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>

<%
	ArrayList<String> list = new ArrayList<String>();
	Cookie[] arr = request.getCookies();
	String id = null;
	String[] strs = null;
	if (arr != null) {
		for (Cookie c : arr) {
			if ("goodId".equals(c.getName())) {
				id = c.getValue();
			}
		}
	}
	if(id != null){
		strs = id.split(",");
	}

	pageContext.setAttribute("list", strs);
	
%>


<body>
<a href="showGoods.jsp">跳转到商品页面</a>
<table>
	<tr>
		<td>产品id</td><td>数量</td><td>操作</td>
	</tr>
	
	<c:forEach items="${list}" var="g">
		<tr>
			<td>${g}</td><td>数量</td><td><a href="del.jsp?id=${g}">从购物车删除</a></td>
		</tr>
	</c:forEach>
</table>


</body>
</html>